import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: RightBackDemo(),
    );
  }
}

class RightBackDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      navigationBar: CupertinoNavigationBar(
          leading: Icon(Icons.refresh), middle: Text("111")),
      child: Scaffold(
        appBar: AppBar(
          title: Text("111"),
        ),
        body: Center(
          child: Container(
            height: 100.0,
            width: 100.0,
            color: CupertinoColors.activeBlue,
            child: CupertinoButton(
              child: Icon(CupertinoIcons.add),
              onPressed: () {
                Navigator.of(context)
                    .push(CupertinoPageRoute(builder: (BuildContext context) {
                  return RightBackDemo();
                }));
              },
            ),
          ),
        ),
      ),
    );
  }
}
